<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('商铺列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>商铺编号：</label>
                                <input type="text" name="storeNumber"/>
                            </li>
                            <li>
                                <label>商铺地址：</label>
                                <input type="text" name="storeAdd"/>
                            </li>
                            <li>
                                <label>商铺类型(1百货,2超市,3小吃,4化妆品,5服装,6电子产品,7珠宝,8生鲜)：</label>
                                <select name="storeType" th:with="type=${@dict.getType('store_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                                </select>
                            </li>
                            <li>
                                <label>商铺名字：</label>
                                <input type="text" name="storeName"/>
                            </li>
                            <li class="select-time">
                                <label>商铺建立时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginStoreBuidtime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endStoreBuidtime]"/>
                            </li>
                            <li class="select-time">
                                <label>商铺关闭时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginStoreClosetime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endStoreClosetime]"/>
                            </li>
                            <li>
                                <label>商铺营业时间：</label>
                                <input type="text" name="storeOpeninghours"/>
                            </li>
                            <li>
                                <label>商铺信息：</label>
                                <input type="text" name="storeMessage"/>
                            </li>
                            <li>
                                <label>商家电话：</label>
                                <input type="text" name="ownerTelephone"/>
                            </li>
                            <li>
                                <label>商铺所有者名字：</label>
                                <input type="text" name="ownerName"/>
                            </li>
                            <li>
                                <label>商铺状态(1营业，2关门)：</label>
<!--                                <input type="text" name="storeState"/>-->
                                <select name="storeState" th:with="type=${@dict.getType('store_state')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                                    </option>
                                </select>
                            </li>
                            <li class="select-time">
                                <label>数据创建时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreatetime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreatetime]"/>
                            </li>
                            <li class="select-time">
                                <label>数据修改时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginUpdatetime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endUpdatetime]"/>
                            </li>
                            <li>
                                <label>商铺经度：</label>
                                <input type="text" name="storeLongitude"/>
                            </li>
                            <li>
                                <label>商铺纬度：</label>
                                <input type="text" name="storeLatitude"/>
                            </li>
                            <li>
                                <label>商铺小图：</label>
                                <input type="text" name="storeMinimgurl"/>
                            </li>
                            <li>
                                <label>商铺排名数：</label>
                                <input type="text" name="rankingnum"/>
                            </li>
                            <li>
                                <label>商铺评分：</label>
                                <input type="text" name="storeGrade"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:store:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:store:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:store:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:store:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:store:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:store:remove')}]];
        var prefix = ctx + "system/store";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "商铺",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '商铺主键',
                    visible: false
                },
                {
                    field: 'storeNumber',
                    title: '商铺编号'
                },
                {
                    field: 'storeAdd',
                    title: '商铺地址'
                },
                {
                    field: 'storeType',
                    title: '商铺类型(1百货,2超市,3小吃,4化妆品,5服装,6电子产品,7珠宝,8生鲜)'
                },
                {
                    field: 'storeName',
                    title: '商铺名字'
                },
                {
                    field: 'storeBuidtime',
                    title: '商铺建立时间'
                },
                {
                    field: 'storeClosetime',
                    title: '商铺关闭时间'
                },
                {
                    field: 'storeOpeninghours',
                    title: '商铺营业时间'
                },
                {
                    field: 'storeMessage',
                    title: '商铺信息'
                },
                {
                    field: 'ownerTelephone',
                    title: '商家电话'
                },
                {
                    field: 'ownerName',
                    title: '商铺所有者名字'
                },
                {
                    field: 'storeState',
                    title: '商铺状态(1营业，2关门)'
                },
                {
                    field: 'createtime',
                    title: '数据创建时间'
                },
                {
                    field: 'updatetime',
                    title: '数据修改时间'
                },
                {
                    field: 'storeLongitude',
                    title: '商铺经度'
                },
                {
                    field: 'storeLatitude',
                    title: '商铺纬度'
                },
                {
                    field: 'storeMinimgurl',
                    title: '商铺小图'
                },
                {
                    field: 'rankingnum',
                    title: '商铺排名数'
                },
                {
                    field: 'storeGrade',
                    title: '商铺评分'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>